package org.example.word.parser;

import org.example.word.AbstractWordDocumentParser;
import org.example.word.pojo.TestApplicationForm;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

@Component
public class TestApplicationFormParser extends AbstractWordDocumentParser<TestApplicationForm> {
    
    @Override
    protected Map<String, String> getFieldMapping() {
        Map<String, String> mapping = new HashMap<>();
        mapping.put("申请企业名称", "companyName");
        mapping.put("申请企业地址", "companyAddress");
        mapping.put("申请企业英文名", "companyEnglish");
        mapping.put("申请日期", "applyDate");
        mapping.put("联系人", "applicant");
        mapping.put("邮箱", "applicantEmail");
        mapping.put("联系电话", "applicantPhone");
        mapping.put("产品名称/型号", "productNameModel");
        mapping.put("产品名称全拼", "productPinyin");
        mapping.put("适配模式", "adaptModeDetail");
        mapping.put("主控（设备）处理器品牌/型号", "mainProcessor");
        mapping.put("模组处理器品牌/型号", "moduleProcessor");
        mapping.put("设备序列号", "serialNumber");
        mapping.put("电鸿版本", "harmonyVersions");
        mapping.put("产品描述", "productDescription");
        return mapping;
    }
    
    @Override
    protected Class<TestApplicationForm> getResultType() {
        return TestApplicationForm.class;
    }
} 